package cn.edu.scnu.pay.controller;

import cn.edu.scnu.entry.model.User;
import cn.edu.scnu.movies.entity.Result;
import cn.edu.scnu.pay.service.PayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api")
public class PayController {

    @Autowired
    private PayService payService;

    @PostMapping("/pay")
    public Result pay(@RequestBody User user){
        payService.pay(user);
        return Result.success();
    }
}
